﻿<%@ Page Title="Contacts" Language="C#" MasterPageFile="~/eTransmittal.Master" AutoEventWireup="true" CodeBehind="Contacts.aspx.cs" Inherits="POI.eTransmittal.WebApp.Contacts" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Xpo.v11.2.Web, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Xpo" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <dx:XpoDataSource ID="xpodsContacts" runat="server" 
        TypeName="POI.eTransmittal.Enitity.Contact">
    </dx:XpoDataSource>
    <dx:XpoDataSource ID="xpodsContactInfo" runat="server" 
        TypeName="POI.eTransmittal.Enitity.ContactInfo" 
        Criteria="[Contact.ID] = ?">
        <CriteriaParameters>
            <asp:SessionParameter DefaultValue="-99" Name="Contact.ID" 
                SessionField="poi.etransmittal_contacts_contactid" />
        </CriteriaParameters>
    </dx:XpoDataSource>
    <dx:ASPxGridView ID="gridContacts" ClientInstanceName="gridContacts" 
        runat="server" AutoGenerateColumns="False" DataSourceID="xpodsContacts" 
        KeyFieldName="ID" Width="100%" onrowdeleting="gridContacts_RowDeleting" 
        onrowinserted="gridContacts_RowInserted" 
        onrowinserting="gridContacts_RowInserting" 
        onrowupdated="gridContacts_RowUpdated" 
        onrowupdating="gridContacts_RowUpdating">
        <Columns>
            <dx:GridViewCommandColumn Caption=" " VisibleIndex="3" Width="60px">
                <EditButton Visible="True">
                </EditButton>
                <NewButton Visible="True">
                </NewButton>
                <DeleteButton Visible="True">
                </DeleteButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="ID" ReadOnly="True" Visible="False" 
                VisibleIndex="0">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Name" VisibleIndex="1">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="OthersInfo" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
        </Columns>
        <Settings ShowFilterRow="True" />
        <SettingsDetail ShowDetailRow="True" />
        <Templates>
            <DetailRow>
                <dx:ASPxGridView ID="gridContactInfo" runat="server" 
                    AutoGenerateColumns="False" DataSourceID="xpodsContactInfo" 
                    KeyFieldName="ID" 
                    onbeforeperformdataselect="gridContactInfo_BeforePerformDataSelect" 
                    onrowdeleted="gridContactInfo_RowDeleted" 
                    onrowdeleting="gridContactInfo_RowDeleting" 
                    onrowinserted="gridContactInfo_RowInserted" 
                    onrowinserting="gridContactInfo_RowInserting" 
                    onrowupdated="gridContactInfo_RowUpdated" 
                    onrowupdating="gridContactInfo_RowUpdating" Width="300px">
                    <Columns>
                        <dx:GridViewCommandColumn Caption=" " VisibleIndex="4" Width="25px">
                            <EditButton Visible="True">
                            </EditButton>
                            <NewButton Visible="True">
                            </NewButton>
                            <DeleteButton Visible="True">
                            </DeleteButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn FieldName="ID" ReadOnly="True" Visible="False" 
                            VisibleIndex="0">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Contact!Key" Visible="False" 
                            VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Type" Visible="False" VisibleIndex="2">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Fax" FieldName="Value" VisibleIndex="3">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsEditing Mode="Inline" />
                </dx:ASPxGridView>
            </DetailRow>
        </Templates>
    </dx:ASPxGridView>
</asp:Content>
